<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>
		<ui:insert name="titulo">
			Sistema de Notas Fiscais
		</ui:insert>
	</title>
	<h:outputStylesheet library="css" name="style.css" />
</h:head>
<h:body>
	<div id="cabecalho">
		<h:graphicImage library="imagens" name="logo-uber.png"
			id="logoCompany" />
			<div style="float: right; margin-right: 15px; margin-top: 5px;">
			<h:form styleClass="i18n">
				<h:commandLink action="#{internacionalizacaoBean.mudaPara('en')}">
					<h:graphicImage name="bandeira_en_US.png" library="imagens" />
				</h:commandLink>
				#{' '}
				<h:commandLink action="#{internacionalizacaoBean.mudaPara('pt')}">
					<h:graphicImage name="bandeira_pt_BR.png" library="imagens" />
				</h:commandLink>
			</h:form>
		</div>
			<h:panelGroup rendered="#{not empty loginBean.usuario.login}">
				<div id="usuarioLogado">
					Logado como: #{usuarioLogado.usuario.nome}
					<ui:remove>
					<h:form>
						<h:commandLink action="#{loginBean.logout}" value="Logout" />
						<h:commandLink action="usuario" value="Cadastro de Usuario" />
					</h:form>
					</ui:remove>
				</div>
			</h:panelGroup>
	</div>

	<div id="conteudo">
		<h:form>
			<p:menubar rendered="#{loginBean.logado}">
				<p:menuitem value="Produtos" url="produto.jsf" icon="ui-icon-home"/>
				<p:submenu label="Notas Fiscais">
					<p:menuitem value="Cadastro" url="notafiscal.jsf" icon="ui-icon ui-icon-document"/>
					<p:menuitem value="Listagem" url="listanotas.jsf" icon="ui-icon-search" />
				</p:submenu>
				<p:menuitem value="Usuários" url="usuario.jsf" icon="ui-icon-person"/>
				<p:menuitem value="Sair" action="#{loginBean.logout}" icon="ui-icon-extlink"/>
			</p:menubar>
		</h:form>
		<ui:insert name="corpo" />
	</div>

	<div id="rodape">Copyright 2013. Todos os direitos reservados.</div>
</h:body>
</html>